//
//  YPLogin_Router.swift
//  YPSwift
//  模块路由
//  Created by ogawa on 2020/4/28.
//  Copyright © 2020 ogawa. All rights reserved.
//

import Foundation
import URLNavigator

public struct YPLogin_Router {
    
    public static func initialize(navigator: NavigatorType) {
        
        /// 弹出登录界面
        navigator.handle("login".formatScheme()) { url, values ,context in
            let loginVc:YPLoginLoginPage_vc = YPLoginCore.storyboard.instantiateViewController()
            loginVc.modalPresentationStyle = .fullScreen;
            let loginNav = YPCoreBaseNav_vc(rootViewController: loginVc)
            loginNav.modalPresentationStyle = .fullScreen
            navigator.present(loginNav)
            return true
        }
        
        //注册
        navigator.register("register".formatScheme()) { url, values ,context in
            let registerVc:YPLoginRegisterPage_vc = YPLoginCore.storyboard.instantiateViewController()
            return registerVc
        }

        //忘记密码
        navigator.register("forget".formatScheme()) { url, values ,context in
            let ForgetVc:YPLoginForgetPage_vc = YPLoginCore.storyboard.instantiateViewController()
            return ForgetVc
        }
        
    }
    
}



